# 彩色蟒蛇绘制。 对 Python 蟒蛇的每个部分采用不同颜色，绘制一条彩色蟒蛇。
import turtle

def DrawSnake(rad,angle,len,neckrad):
    colors = ["purple", "red", "yellow", "pink", "blue"]
    for i in range(len):
        turtle.color(colors[i])
        turtle.circle(rad, angle)
        turtle.circle(-rad, angle)

    turtle.color("green")
    turtle.circle(rad, angle/2)
    turtle.fd(rad)
    turtle.circle(neckrad+1, 180)
    turtle.fd(rad*2/3)

def main():
    turtle.setup(1000, 400, 0, 0)
    turtle.penup()
    turtle.goto(-350, 0)
    turtle.pendown()
    pythonsize = 30
    turtle.pensize(pythonsize)
    turtle.seth(-40)
    DrawSnake(40, 80, 5, pythonsize/2)

main()